package com.yanqu.road.entity.activity.tonbing.data;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@FieldTypeAnnotation(tableName = "t_c_tonbing_data_main")
public class CrossTonBingDataMain extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "锁榜单")
    private boolean lockUnion;

    @FieldTypeAnnotation(desc = "封王大典后的四个人")
    private Map<Integer,Long> winnerMap = new ConcurrentHashMap<>();

    //轮次,级别,阵营，被分配的商会
    private Map<Integer,Map<Integer,Map<Integer,List<String>>>> turnUnionMap = new ConcurrentHashMap<>();

    // ===============================================

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public boolean isLockUnion() {
        return lockUnion;
    }

    public void setLockUnion(boolean lockUnion) {
        if (this.lockUnion != lockUnion) {
            this.lockUnion = lockUnion;
            setOp(DataStatus.Update);
        }
    }

    public Map<Integer, Map<Integer, Map<Integer, List<String>>>> getTurnUnionMap() {
        return turnUnionMap;
    }

    public void setTurnUnionMap(Map<Integer, Map<Integer, Map<Integer, List<String>>>> turnUnionMap) {
        this.turnUnionMap = turnUnionMap;
        setUpdateOption();
    }

    public Map<Integer, Long> getWinnerMap() {
        return winnerMap;
    }

    public void setWinnerMap(Map<Integer, Long> winnerMap) {
        this.winnerMap = winnerMap;
        setUpdateOption();
    }
}
